import request from '@/utils/request';
import { FormDataType,FormDataTypeToken } from './index';

export async function fakeAccountLogin(params: FormDataType) {
  return request('/api/admin/adminLogin', {
    method: 'POST',
    data: params,
  });
}

export async function getFakeCaptcha(mobile: string) {
  return request(`/api/login/captcha?mobile=${mobile}`);
}

//token登录
export async function tokenLogin(params:FormDataTypeToken) {
  console.log('params',params)
  return request('/api/admin/mazex/login', {
    method: 'POST',
    data: params,
  });
}
//获取验证码
export async function getCaptcha() {
  // console.log('params',params)
  return request('/api/admin/captcha/fetch', {
    method: 'GET',
  });
}